import { CommonApi } from '@/api/CommonApi.ts'

// 生成代码
const api = CommonApi('/tables')
type CreateCodeFilter = {
    tableList: any[],
    entityPath: string,
    mapperPath: string,
    servicePath: string,
    controllerPath: string,
    containExport: boolean
}
api.createCode = (params: CreateCodeFilter) => {
    const config = {
        responseType: "blob"
    }
    return api.instance.post('/tables/createCode', params, config)
}
api.listSchema = () => api.instance.get('/tables/listSchema')

export default api